package controller;

import java.util.Locale;
import javax.faces.context.FacesContext;


public class Language {

    private String language;
    private String country;
    private Locale locale = new Locale("pt","BR");

    public String changeLocale(){
        this.locale = new Locale(this.language, this.country);
        FacesContext.getCurrentInstance().getViewRoot().setLocale(locale);
        return "reload";
    }

    public String getLanguage(){
        return this.language;
    }

    public void setLanguage(String string){
        this.language = string;
    }

    public String getCountry(){
        return this.country;
    }

    public void setCountry(String string){
        this.country = string;
    }

     public Locale getLocale(){
         return this.locale;
     }

     public void setLocale(Locale object){
         this.locale = object;
     }

}
